package GUI;


import exceptions.IncorrectInputException;
import field.Field;

public class GUI  {
	private Field theDots; // the entire field
	private char[][] guiField;
	
	private GUI(Field f) throws IncorrectInputException {
		this.theDots = Field.createField(0, 0, null);
		this.theDots.copy(f);
	}
	
	/**
	 * createGUI() returns new instance of the class GUI and if there is no
	 * field no GUI will be created (object will keep reference to nothing(null))
	 * 
	 * @param f - class Field to create field of dots
	 * @return new instance of class GUI
	 * @throws IncorrectInputException 
	 */
	public static GUI createGUI(Field f) throws IncorrectInputException {
		if(f == null) {
			return null;
		}
		else {
			return new GUI(f);
		}
	}

	public void drawRound() {
		
	}

//	@Override
	private void drawWinner() {
		String nameOfWinner = theDots.announceWinner().playerName();
		
		System.out.println("The winner of this game is " + nameOfWinner);
	}
	
	

}
